package org.yeruyi.common.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Author: fuguilong
 * Date: 2017/5/21
 * Version: v1.0
 * Note:
 */
public class ViewPagerAdapter extends FragmentPagerAdapter {

    private List<Fragment> mPage;

    public ViewPagerAdapter(FragmentManager fm, List<Fragment> page) {
        super(fm);
        this.mPage = page;
    }

    @Override
    public int getCount() {
        return mPage.size();
    }

    public Fragment getItem(int position) {
        return mPage.get(position);
    }

}